using System;
using System.IO;
using System.Xml;
using System.Text;
using System.Diagnostics;
namespace BTSProjectWizard.FileGenerators
{ 
	/// <summary>
	/// Summary description for StaticFileGenerator.
	/// </summary>
	public class StaticFileGenerator : IBTWizardFileGen
	{

		public void AddFile(string path,EnvDTE.Project proj,Wizard wiz,string suggestedName)	
		{
			string newfile = null;
            newfile = Path.Combine(Path.GetDirectoryName(proj.FullName), Path.GetFileName(path));
            if (suggestedName != null)
                newfile = newfile.Replace(Path.GetFileNameWithoutExtension(newfile), suggestedName);

            File.Copy(path, newfile);

            proj.ProjectItems.AddFromFile(newfile);
			
		}




        #region IBTWizardFileGen Members

        public bool Init(XmlAttribute[] Attributes, Wizard wiz)
        {
            return true;
        }

        #endregion
    }
}
